package com.th.coupon.common.constant;

/**
 * 通用常量信息
 * @author 涂航
 */
public class Constant {

    /**
     * kafka消息的topic
     * 本次可能使用rabbitMQ
     */
    public static final String TOPIC = "discount_user_coupon_op";

    /**
     * rabbitMq消息的参数
     */
    public static class RabbitMq{
        /**
         *消息对列
         */
        public static final String DISCOUNT_USER_COUPON_QUEUE  = "discount_user_coupon_queue";

        /**
         * 消息交换机
         */
        public static final String DISCOUNT_USER_COUPON_EXCHANGE  = "discount_user_coupon_exchange";

        /**
         * 消息key
         */
        public static final String DISCOUNT_USER_COUPON_KEY = "discount.user.coupon";
    }

    /**
     * redis key 的前缀定义
     */
    public static class RedisPrefix{
        /**
         * 优惠卷key前缀
         */
        public static final String COUPON_TEMPLATE = "discount_coupon_template_code_";
        /**
         * 用户当前所有可用优惠卷key前缀
         */
        public static final String USER_COUPON_USABLE = "discount_user_coupon_usable_";
        /**
         * 用户当前所有已使用的优惠卷key前缀
         */
        public static final String USER_COUPON_USED = "discount_user_coupon_used_";
        /**
         * 用户所有已过期优惠卷key前缀
         */
        public static final String USER_COUPON_EXPIRED = "discount_user_coupon_expired_";
    }
}
